package com.liqing.movecomment.entity;

import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * (Announce)实体类
 *
 * @author makejava
 * @since 2023-05-08 02:01:53
 */
public class Announce implements Serializable {
    private static final long serialVersionUID = -31779737148235487L;
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 公告
     */
    private String title;
    /**
     * 发布人
     */
    private String publisher;
    /**
     * 公告内容
     */
    private String content;
    /**
     * 发布时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    //<editor-fold defaultstate="collapsed" desc="delombok">
    @SuppressWarnings("all")
    public Integer getId() {
        return this.id;
    }
    //</editor-fold>

    /**
     * 公告
     */
    @SuppressWarnings("all")
    public String getTitle() {
        return this.title;
    }

    //<editor-fold defaultstate="collapsed" desc="delombok">
    /**
     * 发布人
     */
    @SuppressWarnings("all")
    public String getPublisher() {
        return this.publisher;
    }

    /**
     * 公告内容
     */
    @SuppressWarnings("all")
    public String getContent() {
        return this.content;
    }

    /**
     * 发布时间
     */
    @SuppressWarnings("all")
    public LocalDateTime getCreateTime() {
        return this.createTime;
    }

    @SuppressWarnings("all")
    public void setId(final Integer id) {
        this.id = id;
    }

    /**
     * 公告
     */
    @SuppressWarnings("all")
    public void setTitle(final String title) {
        this.title = title;
    }

    /**
     * 发布人
     */
    @SuppressWarnings("all")
    public void setPublisher(final String publisher) {
        this.publisher = publisher;
    }

    /**
     * 公告内容
     */
    @SuppressWarnings("all")
    public void setContent(final String content) {
        this.content = content;
    }

    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @SuppressWarnings("all")
    public void setCreateTime(final LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Announce)) return false;
        final Announce other = (Announce) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$title = this.getTitle();
        final Object other$title = other.getTitle();
        if (this$title == null ? other$title != null : !this$title.equals(other$title)) return false;
        final Object this$publisher = this.getPublisher();
        final Object other$publisher = other.getPublisher();
        if (this$publisher == null ? other$publisher != null : !this$publisher.equals(other$publisher)) return false;
        final Object this$content = this.getContent();
        final Object other$content = other.getContent();
        if (this$content == null ? other$content != null : !this$content.equals(other$content)) return false;
        final Object this$createTime = this.getCreateTime();
        final Object other$createTime = other.getCreateTime();
        if (this$createTime == null ? other$createTime != null : !this$createTime.equals(other$createTime)) return false;
        return true;
    }

    @SuppressWarnings("all")
    protected boolean canEqual(final Object other) {
        return other instanceof Announce;
    }

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $title = this.getTitle();
        result = result * PRIME + ($title == null ? 43 : $title.hashCode());
        final Object $publisher = this.getPublisher();
        result = result * PRIME + ($publisher == null ? 43 : $publisher.hashCode());
        final Object $content = this.getContent();
        result = result * PRIME + ($content == null ? 43 : $content.hashCode());
        final Object $createTime = this.getCreateTime();
        result = result * PRIME + ($createTime == null ? 43 : $createTime.hashCode());
        return result;
    }

    @Override
    @SuppressWarnings("all")
    public String toString() {
        return "Announce(id=" + this.getId() + ", title=" + this.getTitle() + ", publisher=" + this.getPublisher() + ", content=" + this.getContent() + ", createTime=" + this.getCreateTime() + ")";
    }

    @SuppressWarnings("all")
    public Announce(final Integer id, final String title, final String publisher, final String content, final LocalDateTime createTime) {
        this.id = id;
        this.title = title;
        this.publisher = publisher;
        this.content = content;
        this.createTime = createTime;
    }

    @SuppressWarnings("all")
    public Announce() {
    }
}
    //</editor-fold>
